@echo off
REM 增强版一键部署脚本

REM 检查Python
where python >nul 2>&1
if %errorlevel% neq 0 (
    echo [错误] 未检测到Python，请先安装Python 3.7+
    pause
    exit /b
)

REM 创建虚拟环境
if not exist ".venv\" (
    python -m venv .venv
)
call .venv\Scripts\activate

REM 安装依赖
pip install --upgrade pip
pip install fastapi uvicorn funasr

REM 启动服务
echo 服务启动中，请访问 http://localhost:8000
echo 按Ctrl+C停止服务
python app.py

pause
